package com.leinao.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * 
 * 环境变量配置
 * @author  wangshoufa 
 * @date 2018年11月7日 下午3:51:13
 *
 */
@RefreshScope
@Component
public class EnvironmentConfig {

	/**
	 * token存入Redis的前缀
	 */
	@Value("${remote.prefix}")
	private String prefix;
	
	/**
	 * 单位:s
	 */
	@Value("${remote.expireSeconds}")
	private Integer expireSeconds;

	/**
	 * redis ip
	 */
	@Value("${spring.redis.host}")
    private String host;

	/**
	 * redis port
	 */
    @Value("${spring.redis.port}")
    private Integer port;

	/**
	 * redis password
	 */
    @Value("${spring.redis.password}")
    private String password;

	/**
	 * redis timeout
	 */
    @Value("${spring.redis.timeout}")
    private Integer timeout;

	/**
	 * redis max-idle
	 */
    @Value("${spring.redis.pool.max-idle}")
    private Integer maxIdle;

	/**
	 * redis max-wait
	 */
    @Value("${spring.redis.pool.max-wait}")
    private Long maxWaitMillis;

	public String getPrefix() {
		return prefix;
	}

	public Integer getExpireSeconds() {
		return expireSeconds;
	}

	public String getHost() {
		return host;
	}

	public Integer getPort() {
		return port;
	}

	public String getPassword() {
		return password;
	}

	public Integer getTimeout() {
		return timeout;
	}

	public Integer getMaxIdle() {
		return maxIdle;
	}

	public Long getMaxWaitMillis() {
		return maxWaitMillis;
	}
	
	
	
}
